venue: type the venue-error surface with invalid-receipt and receipt-mismatch - #597
Merged
Conversation
…mismatch The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors. The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve. Closes #591
mfw78
added a commit
that referenced
this pull request
Jul 27, 2026
…mismatch (#597) The venue-error WIT variant gains two additive, venue-neutral cases for the representable adapter-detected conditions that #589 and #590 had shoved into invalid-body strings: invalid-receipt for an empty or structurally-invalid receipt, and receipt-mismatch for a venue-returned identifier that disagrees with the locally derived one. Both are threaded through the bindgen VenueError, the owned VenueFault mirror and the faults.rs conversions, and the two adapter call sites move off invalid-body onto them so a caller can branch without parsing a message. invalid-body and denied stay as the escape hatch for custom or unrepresentable errors. The change is a purely additive edit to videre:types with no version bump, kept extensible per the pre-cleave freeze policy, so it lands cheaply in the monorepo before the carve. Closes #591
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Give the
venue-errorWIT surface two additive, venue-neutral variants for the representable adapter-detected conditions that #589 and #590 had shoved intoinvalid-bodystrings:invalid-receipt(an empty or structurally-invalid receipt) andreceipt-mismatch(a venue-returned identifier that disagrees with the locally derived one). Both are threaded through the bindgenVenueError, the ownedVenueFaultmirror, thefaults.rsconversions and the host-side display, and the adapter call sites (#590 empty-receipt guard, #589 uid-drift refusal, plus the 56-byte-uid parse) move offinvalid-bodyonto them.invalid-bodyanddeniedstay as the escape hatch for custom or unrepresentable errors.Why
A caller could not branch on these conditions without parsing a message. They are venue-neutral and finite, so they deserve typed variants; the open-ended venue-reported cases keep the stringly escape hatch. This is the sanctioned additive edit to the frozen
videre:typesvenue-error(no version bump, kept extensible per nullislabs/videre-nexum-module#22), landed in the monorepo before the carve so it is a cheap in-tree fold rather than a post-cleave cross-repo ripple.Testing
Full battery on the pinned 1.94 toolchain, all green:
nix develop --command just ci(fmt, clippy-D warnings, doc, module wasms incl. the cow-venue adapter,cargo test --workspace --all-features)nix develop --command just check-venue-agnosticnix develop --command just check-cow-orderbook-onlyAI Assistance
Implemented with Claude Code.
Closes #591